package cn.appsys.service.impl;

import cn.appsys.mapper.CategoryMapper;
import cn.appsys.pojo.Category;
import cn.appsys.service.CategoryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class CategoryServiceImpl implements CategoryService {

    @Resource
    CategoryMapper categoryMapper;

    @Override
    public List<Category> getCategoryLevelList(Integer pId) {
        return pId == null ? null : categoryMapper.getCategoryLevelList(pId);
    }
}
